Skip to content

Add projects update command#173

Closed
IlyaasK wants to merge 1 commit into
codex/normalize-api-key-displayfrom
codex/projects-update-cli
Closed

Add projects update command#173
IlyaasK wants to merge 1 commit into
codex/normalize-api-key-displayfrom
codex/projects-update-cli

Conversation

@IlyaasK
Copy link
Copy Markdown
Contributor

@IlyaasK IlyaasK commented May 29, 2026

Summary

Adds kernel projects update <id-or-name> --name <name> to close the projects CRUD parity gap in the CLI.

What Changed

  • Wires ProjectsService.Update to the generated Go SDK Projects.Update method.
  • Adds ProjectsUpdateInput and ProjectsCmd.Update with the existing <id-or-name> resolver.
  • Adds --name as the required update field.
  • Adds --output json, matching the existing project read/update-style commands that return SDK objects.
  • Registers the new projects update Cobra command.
  • Adds focused tests for:
    • successful name update
    • JSON output
    • resolving a project by name before update
    • missing --name
    • invalid --output

Why

projects create, projects get, projects list, and projects delete already existed, and the SDK already exposes project update. This PR keeps the CLI change surgical by adding name update only, leaving browser telemetry parity for a separate UX/API-design PR.

Verification

  • env GOCACHE=/private/tmp/kernel-cli-go-cache go test ./cmd -run 'TestProjects(Update|List|Get|Limits|Resolve)'
  • env GOCACHE=/private/tmp/kernel-cli-go-cache go test ./cmd ./pkg/util
    • First sandbox run hit the known httptest local-port restriction; rerun outside the sandbox passed.
  • make test
  • make build
  • ./bin/kernel projects update --help

Production smoke against https://api.onkernel.com:

  • Created a disposable project.
  • Renamed it via kernel projects update <old-name> --name <new-name> --output json.
  • Verified the renamed project via kernel projects get <new-name> --output json.
  • Deleted the disposable project and confirmed cleanup.

Localhost smoke:

  • Attempted against http://localhost:3001, but the local API key available in this thread is no longer valid for the current local server state, so the smoke stopped before creating any resource.

Note

Low Risk
Surgical CLI addition with validation and tests; no auth or core infrastructure changes.

Overview
Adds kernel projects update <id-or-name> --name <name> so the CLI can rename projects via the existing Go SDK Projects.Update path, matching create/get/delete patterns.

The handler resolves ID or name (same as other project commands), requires --name, supports --output json, and prints a success line otherwise. FakeProjectsService and unit tests cover success, JSON output, name resolution, missing --name, and invalid --output.

Reviewed by Cursor Bugbot for commit 730cc3b. Bugbot is set up for automated code reviews on this repo. Configure here.

@firetiger-agent
Copy link
Copy Markdown

Monitoring Plan: Add projects update CLI Command

What this PR does: Lets CLI users rename a project via kernel projects update <id-or-name> --name <new-name>.

Intended effect:

  • PATCH /projects/{id} traffic: baseline ~3 calls/24h (near-zero); confirmed if new calls appear with status_code=200 post-deploy.
  • PATCH /projects/{id} 5xx errors: baseline 0; confirmed if rate stays at 0% after deploy.

Risks:

  • PATCH endpoint errors — monitor PATCH /projects/{id} span status.code; alert if any 5xx appears (baseline: 0).
  • Name resolution slowdown — if resolveProjectArg list call degrades, GET /projects p95 could spike; alert if p95 > 400ms (baseline: 142–147ms).
  • Overall API regression — overall HTTP 5xx rate; alert if > 0.5% sustained for any hour (baseline: 0.057–0.167%).

Status updates will be posted automatically on this PR as monitoring progresses.

View monitor

@IlyaasK IlyaasK requested a review from hiroTamada May 30, 2026 03:20
@IlyaasK IlyaasK force-pushed the codex/projects-update-cli branch from 7ff4c5c to 730cc3b Compare June 1, 2026 18:42
@IlyaasK IlyaasK closed this Jun 1, 2026
@IlyaasK
Copy link
Copy Markdown
Contributor Author

IlyaasK commented Jun 1, 2026

closed as a duplicate of #165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant